import 'package:base_lib/index.dart';
import 'package:common_lib/common_compoent.dart';
import 'package:doctor_login_lib/component.dart';
import 'package:flutter/material.dart';

class CommonLib {
  static void doInit() {
    // App.httpProxy = "10.0.0.183:8888";
    App.initializer([CommonComponent(), DoctorLoginComponent()],
        DoctorLoginComponent.loginPage, CommonComponent.compoentListPage);
  }

  static void initWithContext(BuildContext context) {
    ScreenAdapter.getInstance().init(context);
  }

  static void jumpPatientManagement(BuildContext context) {
    Routers.navigateTo(context, CommonComponent.patientManagement,
        parameters: Parameters()..putString("title", "添加就诊人"));
  }

  static void jump2Login(BuildContext context) {
    Routers.navigateTo(context, DoctorLoginComponent.loginPage);
  }
}

class ReminderWrapper extends StatelessWidget {
  final Widget child;

  ReminderWrapper(this.child);

  @override
  Widget build(BuildContext context) {
    return OverlaySupport(child: child);
  }
}
